import request from '@/utils/request'

export function getOrders() {
  return request({
    url: '/order/user',
    method: 'get'
  })
}

export function getOrderDetails(orderId) {
  return request({
    url: `/order/${orderId}`,
    method: 'get'
  })
}

export function createOrder(data) {
  return request({
    url: '/order/create',
    method: 'post',
    data
  })
}

export function updateOrderStatus(orderId, data) {
  return request({
    url: `/order/update/${orderId}`,
    method: 'put',
    data
  })
}

export function deleteOrder(orderId) {
  return request({
    url: `/order/delete/${orderId}`,
    method: 'delete'
  })
}